<div class="modal-header">
    <h5 class="modal-title">磁盘配置</h5>
</div>

<div class="modal-body">

  <div class="form-group">
    <label class="col-sm-2 control-label">主机</label>
    <div class="col-sm-9">
      <select ng-model="order.disks.vm" class="form-control">
        <option value="-1">选择一个需要添加磁盘的主机</option>
        <option>亦庄-dmz1-esale-web-01</option>
        <option>亦庄-dmz2-esale-web-01</option>
        <option>加州-dmz1-esale-web-01</option>
        <option>柏林-dmz1-esale-web-01</option>
        <option>新加坡-dmz1-esale-web-01</option>
        <option>旧金山-dmz1-esale-web-01</option>
      </select>
    </div>
  </div>
</div>


<div class="modal-body">
  <div class="form-group">
    <div class="col-sm-12">
      <table class="table table-bordered">
        <thead>
          <tr>
            <td>名称</td>
            <td>类型</td>
            <td>挂载点</td>
            <td>文件系统</td>
            <td>空间(GiB)</td>
            <td>备份</td>
            <td>操作</td>
          </tr>
        </thead>
        <tbody>
            
          <tr ng-repeat="disk in order.disk.disks">
            <td>
              <input required  ng-maxlength="20" ng-model="disk.name" type="text" class="form-control" >
            </td>

            <td>              
              <select ng-model="disk.type" class="form-control">
                <option value="0">本地</option>
                <option>云盘</option>
                <option>SSD</option>
              </select>
            </td>

            <td>
              <input required ng-pattern="/^\/(a-zA-Z)(a-zA-Z0-9){3,8}$/" ng-maxlength="10" ng-model="disk.mount" type="text" class="form-control" >
            </td>
            <td>
              <select ng-model="disk.fstype" class="form-control">
                <option>ext3</option>
                <option value="ext4">ex4</option>
                <option>unionfs</option>
                <option value="">zfs</option>
              </select>
            </td>            
            <td>
              <input required  ng-model="disk.volume" type="number" class="form-control" >
            </td>
            <td>
              <select ng-model="disk.backup" class="form-control">
                <option value="1">Per Hour</option>
                <option>Per Day</option>
                <option>Per Week</option>
              </select>
            </td>         
            
            <td>
            <button type="button" ng-click="rmDisk(disk)" class="btn btn-danger btn-xs">删除</button>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <!-- add button -->
    <p>
      <a ng-click="addDisk()" class="button button-primary  button-square">
      <i class="fa fa-plus"></i></a>
    </p>
    <!-- add button -->
  </div>
</div>